//
//  UIButton+Extension.m
//  ICome
//
//  Created by zhangrongwu on 16/3/15.
//  Copyright © 2016年 iCom. All rights reserved.
//

#import "UIButton+Extension.h"
#import "ICHeaderFile.h"
@interface UIButton()

@end

@implementation UIButton (Extension)
- (instancetype)initWithTitle:(NSString *)title textColor:(UIColor *)color backImg:(NSString *)image  font:(NSInteger)font{
    if(self = [super init]){
        if (title) {
            [self setTitle:title forState:UIControlStateNormal];
        }
        if (color) {
            [self setTitleColor:color forState:UIControlStateNormal];
        }
        if (image) {
            [self setBackgroundImage:[UIImage imageNamedFromiComeSDKBundle:image] forState:UIControlStateNormal];
        }
        if (font) {
            self.titleLabel.font = ICFont(font * Level);
        }
        self.layer.cornerRadius = 2;
        self.layer.masksToBounds = YES;
    }
    return self;
}




@end
